import enum


class BankEnum(enum.Enum):
    bank = ("bank", "银行", "bank")
    phone = ("phone", "手机号", "phone")
    website = ("website", "银行网址", "website")
    country_abbr = ("country_abbr", "国家缩写", "country_abbr")
    has_bin = ("has_bin", "是否有BIN", "has_bin")
    create_time = ("create_time", "创建时间", "create_time")
    update_time = ("update_time", "修改时间", "update_time")

    def __init__(self, attr, desc_, value):
        self._attr = attr
        self._desc_ = desc_
        self._value = value

    def __repr__(self):
        return f'BankEnum({self._attr}, {self._desc_}, {self._value})'

    @property
    def attr(self):
        return self._attr

    @attr.setter
    def attr(self, new_attr):
        self._attr = new_attr

    @property
    def desc_(self):
        return self._desc_

    @desc_.setter
    def desc_(self, new_desc):
        self._desc_ = new_desc

    @property
    def value(self):
        return self._value

    @value.setter
    def value(self, new_value):
        self._value = new_value

    @staticmethod
    def getDescList():
        return [item.desc_ for item in BankEnum]

    @staticmethod
    def getValuesStr():
        return ','.join([item.value for item in BankEnum])

    @staticmethod
    def getValuesList():
        return [item.value for item in BankEnum]
